package com.biostime.dingdingbox.modules.sys.entity;

import com.biostime.dingdingbox.common.config.Global;
import com.biostime.dingdingbox.common.persistence.DataEntity;

/**
 * 角色表Entity
 * @author phil
 * @version 2015-11-03
 */
public class Role extends DataEntity<Role> {

	private static final long serialVersionUID = 1L;
	
	// 数据范围（0：所有数据；1：所在中心数据；2：仅本人数据；）
	public static final String DATA_SCOPE_ALL = "0";
	public static final String DATA_SCOPE_CENTER_AND_CHILD = "1";
	public static final String DATA_SCOPE_SELF = "2";
	
	private String name;// 角色名称
	private String enname;// 英文名称
	private String roleType;// 角色类型
	private String dataScope;// 数据范围（0：所有数据；1：所在中心数据；2：仅本人数据；）
	private String isSys;// 是否系统数据
	private String useable;// 是否可用
	
	private boolean checked;// 是否选中
	
	private User user;		// 根据用户ID查询角色列表
	
	public Role(){
		this.useable = Global.YES;
	}
	
	public Role(String id){
		super(id);
	}
	
	public Role(User user){
		this();
		this.setUser(user);
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getEnname() {
		return enname;
	}

	public void setEnname(String enname) {
		this.enname = enname;
	}
	
	public String getRoleType() {
		return roleType;
	}

	public void setRoleType(String roleType) {
		this.roleType = roleType;
	}
	
	public String getDataScope() {
		return dataScope;
	}

	public void setDataScope(String dataScope) {
		this.dataScope = dataScope;
	}
	
	public String getIsSys() {
		return isSys;
	}

	public void setIsSys(String isSys) {
		this.isSys = isSys;
	}
	
	public String getUseable() {
		return useable;
	}

	public void setUseable(String useable) {
		this.useable = useable;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
}